<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>事件练习</title>
</head>
<body>
    <p id="demo">点我</p>
    <script>
        p=document.getElementById("demo")
        p.onclick =function () {
            alert ("你好呀 我叫树润久")
        }
    </script>
</body>
</html>